var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var CarSchema = new Schema({
  user:{
    type:Schema.Types.ObjectId,
    ref:"users"
  },
  rating:String,
  carType:String,
  carNum:String,
  rentState:Boolean,
  passState:Boolean,
  beused:Boolean,
  price:Number,
  place:String,
  imgUrl:Array,
  evaluation:[
    {
      comType:String,
      describe:String,
      ordersId:String,
    }
  ],
  detail:{
    // carAge:String,  //车龄
    volume:String,    //排量
    oilType: String, //油型
    seats: String,    //油量
    contain: String,    //座位
  },
  check:Boolean,

})

mongoose.model("cars", CarSchema, "cars");